<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Constants\ErrorCode;
use App\Controller\AbstractController;
use App\Service\AreaService;
use Hyperf\Di\Annotation\Inject;
use App\Utils\ApiUtils;


class AreaController extends AbstractController
{

    /**
     * @Inject
     * @var AreaService
     */
    protected $areaService;

    /**
     * 获取地区列表
     */
    public function list()
    {
        $result = $this->areaService->list();
        return $this->response->json(ApiUtils::send(ErrorCode::SUCCESS,'获取成功',$result));
    }


}
